/*!
\copyright  Copyright (c) 2023 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief      Reports enhanced safety over AT+BIEV command.

*/

#include "hfp_profile_enhanced_safety.h"

#include "hfp_profile_private.h"
#include "hfp_profile_sm.h"
#include "hfp_profile_states.h"
#include "hfp_profile_instance.h"
#include "hfp_profile_port.h"
#include <hfp_profile.h>

#include <hfp.h>

#include <logging.h>

#define HFP_PROFILE_ENHANCED_SAFETY_DISABLED 0x0
#define HFP_PROFILE_ENHANCED_SAFETY_ENABLED 0x1

static uint8 hfpProfile_GetEnhancedSafetyValue(void)
{
    return HFP_PROFILE_ENHANCED_SAFETY_DISABLED;
}

void HfpProfile_EnableEnhancedSafetyHfInd(hfpInstanceTaskData *instance, uint8 enable_enhanced_safety_ind)
{
    DEBUG_LOG_VERBOSE("HfpProfile_EnableEnhancedSafetyHfInd 0x%x", enable_enhanced_safety_ind);

    if(enable_enhanced_safety_ind)
    {
        instance->bitfields.hf_indicator_assigned_num |= hf_enhanced_safety;
        hfpProfile_SendBievEnhancedSafetyToInstance(instance, hfpProfile_GetEnhancedSafetyValue());
    }
    else
    {
        instance->bitfields.hf_indicator_assigned_num &= ~hf_enhanced_safety;
    }
}

